package org.example.pack7;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Student {

    @Value("${myname}")
    private String name;
    @Value("${myage}")
    private Integer age;

    @Resource
    private School pack7School;


    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", school=" + pack7School +
                '}';
    }
}


